<?php

require_once("../../controllers/init.php");
require_once($FILE_SYSTEM_ROOT."/controllers/authentication.php");

$emailGroups = array();

if (isset($_POST['emailGroups']))
	$emailGroups = $_POST['emailGroups'];


$people = new PeopleResultSet($emailGroups);

$peopleArray = $people->getPeople();

foreach ($peopleArray as $person)
{
	foreach ($person->getEmails() as $email)
	{
		print $email."; ";
	}
}

?>